int accountBalanceAfterPurchase(int purchaseAmount)
{
    int rest=0;
    int pay=0;
    if(purchaseAmount%10==0)
    pay=purchaseAmount;
    if(purchaseAmount%10>=5)
    pay=(purchaseAmount/10)*10+10;
    if(purchaseAmount%10<5)
    pay=(purchaseAmount/10)*10;
    
    rest=100-pay;
    return rest;
}